{% comment %}
<!--
  Copyright (C) 2008 ZHENG Zhong <http://www.zhengzhong.net/>

  Created on 2009-04-08.
  $Id$
-->
{% endcomment %}

<div id="names" class="ajax_box">

  {% include "foodsnroses/ajax/ajax_error.html" %}
  
  <!-- view _____________________________________________________________________________________-->
  
  <div class="view">
  
    <span class="h1">{{resto.names|escape}}</span>
    
    {# TODO: Should we allow managers to update the resto names? ##################################}
    {% comment %}
    
    {% if resto.is_manageable %}
      <span class="toggle_link">
        <a href="javascript:void(0);" onclick="toggleBox('#names');">[edit]</a>
      </span>
    {% endif %}
    
    {% endcomment %}
  
  </div><!--/.view-->
  
  {% comment %}
  {% if resto.is_manageable %}
  
    <div class="edit hidden">
    
      <form id="update_names_form" class="form" action="." method="POST"
            onsubmit="return submitAjaxForm('#names', '#update_names_form');">
        <input type="hidden" name="ajax_box" value="names"/>
        <div>
          Chinese name:
          <input type="text" name="chinese_name" value='{{resto.chinese_name|default:""|escape}}'/>
          / Name:
          <input type="text" name="name" value='{{resto.name|escape}}'/>
          <input class="button" type="submit" value="Update"/>
          <input class="button" type="button" onclick="toggleBox('#names');" value="Cancel"/>
          <span class="ajax_indicator hidden">
            <img src="{{static_}}/images/ajax_indicator.gif" alt="AJAX Indicator"/>
          </span>
        </div>
      </form>
    
    </div><!--/.edit-->
  
  {% endif %}
  {% endcomment %}

</div><!--/#names-->



